package com.itheima.reflect1;

public class MyReflectDemo {
    public static void main(String[] args) throws ClassNotFoundException {
        //熟悉反射
        //1.获取Class对象
        //1.1Class.forName("全类名")
        Class class1 = Class.forName("com.itheima.reflect1.MyReflectDemo");
        System.out.println(class1);
        //1.2类名.class
        Class class2 = MyReflectDemo.class;
        System.out.println(class2);
        //1.3对象.getClass()
        Class class3 = new MyReflectDemo().getClass();
        System.out.println(class3);

        System.out.println(class1==class2);//true
        System.out.println(class3==class2);//true


    }
}
